<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>2</title>
</head>
<body>
<script>
  /*
  根据随机成绩输出对应的等级，使用if语句实现
  a) A级   [90,100]
  b) B级   [80,90)
  c) C级   [70,80)
  d) D级   [60,70)
  e) E级   [0,60)
   */
  var num1 = Math.floor(Math.random() * 101);
  if (num1 >= 90 && num1 <= 100) {
      console.log(num1 + "是A级")
  } else if (num1 >= 80 && num1 < 90) {
      console.log(num1 + "是B级")
  } else if (num1 >= 70 && num1 < 80) {
      console.log(num1 + "是C级")
  } else if (num1 >= 60 && num1 < 70) {
      console.log(num1 + "是D级")
  } else if (num1 >= 0 && num1 < 60) {
      console.log(num1 + "是E级")
  }

</script>
</body>
</html>